<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>vue</title>
        <!-- 引入vue文件-->
		<script src="http://static.runoob.com/assets/vue/1.0.11/vue.min.js"></script>
	</head>
	<body>
		<div id="vue">
			<p>{{message}}</p>
			<!--监听事件 -->
			<button v-on:click="reverse">反转</button>
		</div>
		<script>
			new Vue({
				el:'#vue',
				data:{
					message:'侯征'
				},
				methods:{
					reverse:function(){
						this.message=this.message.split('').reverse().join('')
					}
				}
			})
		</script>
	</body>
</html>
